#ifndef PARSER_H
#define PARSER_H

/*!
  \class Parser
  \brief Abstract base class of all the parsers.

    To make your own parser subclass this class and
    reimplement ParseFile().  To help the user understand
    the parsing error you many reimplement GetErrors().

  */

//Our includes
class Survey;

//Std includes
#include <list>
#include <string>

class Parser {
public:
    Parser();

    virtual ~Parser() { }
    /*!
      Reimplement this in if your subclass Parser.

      This function should return a new Survey of the
      parsed file. Or it will return NULL if the parser
      failed to parse the file.  See GetErrors() to find out
      the parsing errors that have accured by the parser.

     \return Survey - The suvey that has been populated

     You, the user, is responsible for deleting the survey
     that has been returned.  This parser is no longer resposible
     for it.

      Also see GetErrors().
      */
    virtual Survey* ParseFile(std::string& fileName) = 0;

    //Gets all the error for the parser
    virtual std::list<std::string> GetErrors();
};

#endif // PARSER_H
